<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>BOM</title>
</head>
<body>
<div id="message">0</div>
<button id="btnRemove">删除</button>

</body>
<script>

    /*1. window 全局对象*/

    // window.document.getElementById("message");
     //window.Math.PI

     window.message  = 'hello';
     //var message='hhh';

    {
       // message = '';
    }

    /*2.location*/
    //location.href = "index.html";

    /*3.history*/

   /*4. popupAlert*/

  //  alert("hello")

    /* document.getElementById('btnRemove').onclick=function () {
         if(confirm("是否删除这个数据？")){
             alert("删除成功！")
         }
     }*/

  /*  var question= prompt("请输入你的问题");

    alert(question);*/


   /*5 timming*/

 /*   setInterval(function () {
        var num= document.getElementById("message").innerText;
        num=parseInt(num);
        num+=1;
        document.getElementById("message").innerText=num;
    },1000)*/

    /* function setNumber() {
         var num= document.getElementById("message").innerText;
         num=parseInt(num);
         num+=1;
         document.getElementById("message").innerText=num;
     }
     setInterval(setNumber,1000);
     clearInterval(setNumber)*/

    var message= document.getElementById("message");
    message.innerText = "waiting......";
    setTimeout(function () {
        var message= document.getElementById("message");
        message.innerText = "end";
    },2000)
</script>
</html>